#ifndef __MARS_GRAPHICS_TEXTURE_H__
#define __MARS_GRAPHICS_TEXTURE_H__

#include "MarsObject.h"

using namespace Core;

namespace Graphics
{

class Texture : public Object
{
public:
	enum TextureType
	{
		TT_1D						= 0,
		TT_2D						= 1,
		TT_3D						= 2,
	};

public:
									Texture( TextureType eType );
									Texture( TextureType eType, const char* pTexFileName );

									~Texture();

	bool							LoadTexture();
	void							UnloadTexture();

	ID3D11ShaderResourceView*		GetNativeTextureSRV();

private:
	TextureType						m_eType;
	std::string						m_strTexFileName;

	ID3D11ShaderResourceView*		m_pTextureSRV;
};

inline Texture::Texture( TextureType eType )
	: m_eType( eType )
	, m_pTextureSRV( NULL )
{

}

inline Texture::Texture( TextureType eType, const char* pTexFileName )
	: m_eType( eType )
	, m_strTexFileName( pTexFileName )
	, m_pTextureSRV( NULL )
{

}

inline Texture::~Texture()
{
	UnloadTexture();
}

inline ID3D11ShaderResourceView* Texture::GetNativeTextureSRV()
{
	return m_pTextureSRV;
}

} // end of namespace Graphics

#endif // end of #ifndef __MARS_GRAPHICS_TEXTURE_H__